{template header_seller}
<div id="mainFrame">
	<div class="seller-tab-bar">
    	<div class="item on"><a href="/?m=$G[m]&c=$G[c]&a=setting">基本设置</a></div>
        <div class="item"><a href="/?m=$G[m]&c=$G[c]&a=mark">位置标注</a></div>
        <div class="item"><a href="/?m=$G[m]&c=goods">商品管理</a></div>
        <div class="item"><a href="/?m=$G[m]&c=sold">订单管理</a></div>
    </div>
    <div class="blank"></div>
    <div class="tableView">
      <form method="post" autocomplete="off" id="shopForm" enctype="multipart/form-data">
      <input type="hidden" name="formsubmit" value="yes" />
      <input type="hidden" name="formhash" value="{FORMHASH}" />
        <div class="row">
            <div class="cell cell-name">店铺名称</div>
            <div class="cell cell-input">
            <input type="text" class="input-text" maxlength="20"  name="shopnew[shopname]" value="$shop[shopname]" id="shopname">
            </div>
            <div class="cell">店铺名称，20个字以内</div>
        </div>
        <div class="row">
            <div class="cell cell-name">行业分类</div>
            <div class="cell cell-input">
                <select class="input-select" name="shopnew[catid]">
                {$categoryoptions}
                </select>
            </div>
            <div class="cell"></div>
        </div>
        <div class="row">
            <div class="cell cell-name">联系电话</div>
            <div class="cell cell-input">
            <input type="text" class="input-text" maxlength="11"  name="shopnew[tel]" value="$shop[tel]">
            </div>
            <div class="cell"></div>
        </div>
        <div class="row">
            <div class="cell cell-name">所在地</div>
            <div class="cell">
                <select class="input-select dist select" id="province" name="shopnew[province]">
                    <option value="">请选择</option>
                </select>
                <select class="input-select dist select" id="city" name="shopnew[city]">
                    <option value="">请选择</option>
                </select>
                <select class="input-select dist select" id="county" name="shopnew[county]">
                    <option value="">请选择</option>
                </select>
            </div>
            <div class="cell"></div>
        </div>
        <div class="row">
            <div class="cell cell-name">详细地址</div>
            <div class="cell cell-input">
            <input type="text" class="input-text" maxlength="50"  name="shopnew[address]" value="$shop[address]">
            </div>
            <div class="cell">实体店详细地址</div>
        </div>
        <div class="row">
            <div class="cell cell-name">店铺简介</div>
            <div class="cell"><textarea class="textarea" name="shopnew[summary]" style="height:60px;" placeholder="店铺经营项目等">$shop[summary]</textarea></div>
        </div>
        <div class="row">
            <div class="cell cell-name">店铺标志</div>
            <div class="cell">
            	<p><img src="{echo image($shop[logo]);}" width="80" height="80"></p>
            	<input type="file" name="filedata">
            </div>
        </div>
        <div class="row">
        	{eval $editorname='description';}
            {eval $editorcontent=$description[description];}
            <div class="cell cell-name">详细介绍</div>
            <div class="cell">{template editor_mini}</div>
        </div>
        <div class="row tfooter">
            <div class="cell cell-name">&nbsp;</div>
            <div class="cell"><button type="submit" class="button" node="button">保存资料</button></div>
        </div>
        </form>
    </div>
</div>
<script type="text/javascript">
DSXCMS.showDistrict(0, '#province', '$shop[province]', '选择省份');
$("#province").change(function(e) {
	var fid = parseInt($(this).find(":selected").attr("idvalue"));
    if(fid) DSXCMS.showDistrict(fid, '#city', '$shop[city]', '选择城市');
});
$("#city").change(function(e) {
	var fid = parseInt($(this).find(":selected").attr("idvalue"));
    if(fid) {
		DSXCMS.showDistrict(fid, '#county', '$shop[county]', '选择区县');
	}
});
$("#shopForm").submit(function(e) {
    var shopname = $.trim($("#shopname").val());
	if(shopname.length > 1) {
		return true;
	}else {
		DSXUI.error('店铺名称不能为空');
		return false;
	}
});
</script>
{template footer_seller}